package Controls
{
	public class LabelButton extends Interactive
	{
		public var label:Label;
		public function LabelButton()
		{
			super();
			label=new Label();
			addChild(label);
		}
		public function setLabel(text:String,html:Boolean=false,handleX:Number=0.5,handleY:Number=0.5):void
		{
			if(html)
			{
				label.textField.htmlText=text;
			}
			else
			{
				label.textField.text=text;
			}
			
			layout(handleX,handleY);
		}
		protected function layout(handleX:Number,handleY:Number):void
		{
			label.moveTo(image.obj.width*handleX,image.obj.height*handleY,0.5,0.5);
		}
	}
}